package com.intct.flink;

import com.intct.hbase.bean.Book;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.streaming.api.functions.sink.RichSinkFunction;
/**
 * @author gufg
 * @since 2025-06-26 16:50
 */
public class HBaseSinkFunc extends RichSinkFunction<Book> {

    @Override
    public void open(Configuration parameters) throws Exception {
        System.out.println("连接HBase....");
    }

    @Override
    public void invoke(Book value, Context context) throws Exception {
        // 业务逻辑
        System.out.println("业务逻辑...." + value.getTitle());
    }

    @Override
    public void close() throws Exception {
        System.out.println("关闭HBase....");
    }
}
